<template>
  <div>
    <div class="home">我是home</div>
    <hello></hello>
    <ul>
      <li v-for="(item,index) in arr" :key="item">
        {{item}}=>{{index}}
      </li>
    </ul>
  </div>
</template>

<script>
import Hello from '../../components/HelloWorld'
export default {
  data () {
    return {
      arr:[]
    }
  },
  created () {
    this.fetchData()
  },
  methods: {
    fetchData () {
      setTimeout(() => {
        this.arr = [1, 2, 3, 4]
      }, 2000)
    }
  },
  components: {
    Hello
  }
}
</script>

<style lang="scss" scoped>
.home{
  color:blue;
}
</style>
